1. Field of the Invention
The present invention relates to an absolute encoder for use in a servo control device for driving the movable part of an industrial machine and a machine tool, and a method of generating the current position of the absolute encoder.
2. Description of the Background Art
In an environment where there is a motor driving shaft to move a load, it may be important to know precisely the position of the load. Information concerning the exact position is provided by an absolute encoder attached to the shaft. For example, where a motor is operative to rotate a shaft that drives a belt for lifting an object up or down, the motor may continue to rotate even where the absolute encoder device is off, and the motor can rotate an additional amount even where the motor itself is not energized, due to inertia. When the absolute encoder is commanded ON again and the motor is rotating, it is important to know the exact position of the motor.
In an absolute encoder which restores a value with limited resolution and then outputs a position of high resolution, there is employed a method which restores a current position at an arbitrary resolution of the absolute encoder, adds an increment pulse to the restored value for subsequent rotations, and sets a given value at the "edge" of the least significant bit of resolution in performing the restoration. Here, the "edge" means a time when the least significant bit is rising as the absolute encoder rotates in the forward direction or a time when the least significant bit is falling as the absolute encoder rotates in the backward direction.
The conventional absolute encoder is seen with reference to FIGS. 10 to 13, and in particular, FIG. 10 is a structural view of an entire absolute position detection system using an absolute encoder, FIG. 11 is a timing chart of bits detected by a photosensor part 50 shown in FIG. 10, and FIG. 12 is a graphical representation of the least significant bit signal level of resolution in the photosensor part 50 shown in FIG. 10. FIG. 13 is a flowchart showing a process for generating a current position.
In FIG. 10, reference character 8 designates an absolute encoder, 9 a motor, 10 a coupling which transmits the movement of the motor 9 to the absolute encoder 8, 11 a glass disk which rotates in synchronization with the motor 9, 12 a slit for a 6-bit resolution existing on the glass disk 11, 13 a slit for an increment pulse, 14 a light emitting source for illuminating the photosensor 50, 16 a resistance which adjusts the power from a power supply 51 to the light emitting source 14, 18 an operation circuit which converts the resolution 6 bits for restoring and an increment pulse respectively detected by the photosensor part 50 to output position data, 30 a servo amplifier, 31 a CPU which performs a feedback control by use of the output position data output from the operation circuit 18 and command position data from an external device such as a host controller and the like, and 32 an amplification circuit which amplifies a control command from the CPU 31 and supplies power to the motor 9.
In FIG. 11, a plurality of synchronized signals within the absolute encoder are shown, wherein b1 stands for the most significant bit of a resolution-in-restoring which is counted 2 per rotation of the absolute encoder, b2 a second bit of the resolution-in-restoring which is counted 4 per rotation of the absolute encoder, b6 the least significant bit of the resolution-in-restoring which is counted 64 per rotation of the absolute encoder. Also, with reference to signal b6, as shown in a magnified portion of the illustration, A and B are respectively the edges of the least significant bit, and i is an increment pulse which is counted at the greatest resolution per rotation of the absolute encoder.
Referring to FIG. 12, 40 designates the least significant bit signal waveform of a resolution-in-restoring in the photosensor part 50 for the low-speed rotation of the absolute encoder, 41 is the least significant bit signal waveform of the photosensor part 50 for the high-speed rotation of the absolute encoder, and d is the amount of error in the edge passage time of the least significant bit during the high-speed rotation of the absolute encoder.
In the above-mentioned absolute position detect system using an absolute encoder, it may be assumed that initially the motor 9 is at a standstill. At first, simultaneously when the power supply 51 of the absolute encoder 8 rises, the light emitting source 14 and sensor 17 start to operate.
The sensor 17 detects light passing through the resolution 6 bit slit 12 in restoring to thereby recognize the 6-bit data. However, the sensor does not recognize the change of the pulse from the increment pulse slit 13. On receiving the 6-bit data, the operation circuit 18 sets the output position data with 6-bit resolution.
Referring to the flowchart shown in FIG. 13 and the bit timing chart shown in FIG. 11, if a position is detected at a point D in step 101, then the 6-bit data ranging from b1 to b6 can be recognized. In the operation circuit 18, since only arbitrary positions in the range of an A point to a C point can be recognized, a central point value E between the points A and C is set as the output position data (step 102). The output position data is equivalent to the restored value of the absolute position detect system. Namely, at this time, the output position data includes a pulse error between the D point and the E point.
In a block in which the motor 9 is rotated in the forward direction and the absolute encoder reaches the point B, the operation circuit 18 adds the number of counts of the increment pulses i to the position data of the point E and sets the resultant value as the output position data (steps 103 to 105). Therefore, it can be said that the 6-bit resolution position including the error between D point and E point is being output even at the current time.
When the absolute encoder passes through the point B, the operation circuit 18 sets again a given value equivalent to the edge position as the output position data (steps 104, 109). From this time, the output position data become data which are of the most significant resolution level. Namely, the error between D point and E point is canceled. Following this time, in accordance with steps 110 to 111, by adding the number of counts of the increment pulses i to the position data at the point B, the output position data will be updated and output.
In addition, the following is an explanation in a case where the motor 9 rotates in the backward direction. The steps 101 and 102 are performed in a manner similar to that of the forward direction. The operation circuit 18 subtracts the number of counts of the increment pulses i from the position data of E point and sets the resultant value as the output position data (steps 106 to 108).
When the absolute encoder passes through the point A, the operation circuit 18 sets again a given value equivalent to the edge position as the output position data (steps 107, 109). Following this time, in accordance with steps 112 to 113, by subtracting the number of counts of the increment pulses i from the position data of E point, the output position data will be updated and output.
The servo amplifier 30 takes in the position data as the feedback value of the absolute encoder 8. The CPU 31 calculates a difference between the feedback value and the command position data and creates a control command which controls the feedback value to follow the command position data, and the amplifier circuit 32 converts the command position data to power and amplifiers the power so that power can be supplied to the motor 9.
Due to the fact that the conventional absolute encoder is constructed in the above-mentioned manner, after the rising of the power supply of the absolute encoder, the current position at the maximum resolution is reset at the first edge of the least significant bit of the resolution in a restoring operation. That is, the accuracy of the current position thus set has a direct influence on the accuracy of the following absolute position data. In a driving system using the absolute encoder, the power supply is begun when the motor is rotating at high speed. For example, it is a system in which the motor drives a falling item. In such a system, the waveform of the signal level of b6 in the sensor 17 of the absolute encoder, as shown in FIG. 12, is originally dull, that is, it is as shown by a waveform 40 which is obtained in the low-speed rotation of the absolute encoder. If the speed in the edge passing time is increased, then the edge is detected delayed by the time error d, as shown by a waveform 41 which is obtained in the high-speed rotation of the absolute encoder. That is, the number di of the pulses that have moved during the time error d are accumulated as the absolute position errors. Further, if the speed in the edge passing time is increased, the error of the absolute position is increased because the waveform 41 delays from the original waveform. Accordingly, the conventional absolute encoder has the following problems. If the motor 9 is rotating at the high speed when the power supply of the absolute encoder rises, then position shifting occurs in the absolute position. Further, the higher speed gets the larger amount of the error.